From 8957302bd4841b75772214d4e6ea32090733cb35 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 23 Nov 2022 23:32:19 +0100 Subject: [PATCH] dialog: GTK_DIALOG_ERROR_CANCELLED => GTK_DIALOG_ERROR_DISMISSED The term "cancelling" is used with GCancellable, a user clicking a close button is not that. User input is usually described as "dismissing", so we use that term. --- gtk/gopenuriportal.c | 2 +- gtk/gtkcolordialog.c | 2 +- gtk/gtkdialogerror.h | 6 +++--- gtk/gtkfiledialog.c | 2 +- gtk/gtkfontdialog.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gtk/gopenuriportal.c b/gtk/gopenuriportal.c index 16c63cbd9a..8a2ac1db6b 100644 --- a/gtk/gopenuriportal.c +++ b/gtk/gopenuriportal.c @@ -151,7 +151,7 @@ response_received (GDBusConnection *connection, g_task_return_boolean (task, TRUE); break; case XDG_DESKTOP_PORTAL_CANCELLED: - g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "The portal dialog was closed"); + g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "The portal dialog was dismissed by the user"); break; case XDG_DESKTOP_PORTAL_FAILED: default: diff --git a/gtk/gtkcolordialog.c b/gtk/gtkcolordialog.c index 3d02733599..e5ebe9d978 100644 --- a/gtk/gtkcolordialog.c +++ b/gtk/gtkcolordialog.c @@ -390,7 +390,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application"); else if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) - g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by user"); + g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "Dismissed by user"); else g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_FAILED, "Unknown failure (%d)", response); diff --git a/gtk/gtkdialogerror.h b/gtk/gtkdialogerror.h index f2ce55c065..809d00e538 100644 --- a/gtk/gtkdialogerror.h +++ b/gtk/gtkdialogerror.h @@ -41,8 +41,8 @@ G_BEGIN_DECLS * an operation fails and no more specific code is applicable * @GTK_DIALOG_ERROR_ABORTED: The async function call was aborted * programmatically (via its `GCancellable`) - * @GTK_DIALOG_ERROR_CANCELLED: The async operation was cancelled - * by the user (via a Close button) + * @GTK_DIALOG_ERROR_DISMISSED: The operation was cancelled + * by the user (via a Cancel or Close button) * * Error codes in the `GTK_DIALOG_ERROR` domain that can be returned * by async dialog functions. @@ -53,7 +53,7 @@ typedef enum { GTK_DIALOG_ERROR_FAILED, GTK_DIALOG_ERROR_ABORTED, - GTK_DIALOG_ERROR_CANCELLED + GTK_DIALOG_ERROR_DISMISSED } GtkDialogError; GDK_AVAILABLE_IN_4_10 diff --git a/gtk/gtkfiledialog.c b/gtk/gtkfiledialog.c index d35deeac06..a5a42b379d 100644 --- a/gtk/gtkfiledialog.c +++ b/gtk/gtkfiledialog.c @@ -655,7 +655,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application"); else if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) - g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by user"); + g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "Dismissed by user"); else g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_FAILED, "Unknown failure (%d)", response); diff --git a/gtk/gtkfontdialog.c b/gtk/gtkfontdialog.c index 334dcaf93a..39e068cec2 100644 --- a/gtk/gtkfontdialog.c +++ b/gtk/gtkfontdialog.c @@ -563,7 +563,7 @@ response_cb (GTask *task, else if (response == GTK_RESPONSE_CLOSE) g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application"); else if (response == GTK_RESPONSE_CANCEL) - g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by user"); + g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "Dismissed by user"); else g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_FAILED, "Unknown failure (%d)", response); -- 2.30.2